home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 2
/
Geek_Gadgets_2_2352.bin
/
lists
/
ade-gcc.archive.9602.gz
/
ade-gcc.archive.9602
/
000093_owner-ade-gcc_Mon Feb 19 08:19:47 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-02-28
|
2KB
Return-Path: <owner-ade-gcc>
Received: by fishpond (Smail3.1.29.1 #57)
id m0toVUg-000gXba; Mon, 19 Feb 96 08:19 EST
Sender: owner-ade-gcc
Received: from delta.mdy.univie.ac.at by fishpond with smtp
(Smail3.1.29.1 #57) id m0toVUa-000gXUC; Mon, 19 Feb 96 08:19 EST
Received: from localhost by delta.mdy.univie.ac.at with SMTP
(1.38.193.4/16.2) id AA22241; Mon, 19 Feb 1996 14:13:07 +0100
Message-Id: <31287761.20B3@mdy.univie.ac.at>
Date: Mon, 19 Feb 1996 14:13:05 +0100
From: Alfred Minarik <am@mdy.univie.ac.at>
X-Mailer: Mozilla 2.0 (X11; I; HP-UX A.09.05 9000/720)
Mime-Version: 1.0
To: Kamil Iskra <kiskra@ernie.icslab.agh.edu.pl>
Cc: amiga-gcc-port@nic.funet.fi, ADE GCC List <ade-gcc@ninemoons.com>
Subject: Re: Passing arguments in registers and stack checking/extension
References: <Pine.SUN.3.91.960219131058.6881A-100000@ernie>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-ade-gcc@ninemoons.com
Precedence: bulk
Kamil Iskra wrote:
>
> d0/d1/a0/a1 are scratch registers, ie. you don't have to preserve them
> across function calls. All the other registers has to be preserved.
>
> If I remember correctly, current structure of function prologue used in
> Amiga port of GCC is the following ([] are optional):
>
> [
> 1. Put amount of place needed for frame in d0, as an argument for [2].
> 2. Call stack checking/extension routine.
> ]
> 3. Create a stack frame (link).
> 4. Save non-scratch registers used inside function body on stack.
>
> If you wanted to use "d2" as an argument to stack checking/extension, you
> would have to preserve it. However, as you can see, saving non-scratch
> registers is (very reasonably) performed AFTER stack checking. This is the
> problem.
>
> Maybe I misunderstood you, but what do you need (+a2) for (actually: what
> do you MEAN by "(+a2)")?
>
You are absolutly right.
So we might split the scrach registers one (maybe d0) for stack
routines, others for argument passing. (Will complicate (link)libraries
if you want to use all scratch registers in case of no stack routines
[You need probably two different compiled libraries]).
And I don't know wether this is efficient, nor if it can easily be
imlemented.
It was all only a quick idea.
- Alfred